<?php


Class Person extends AppModel {
    
    var $name = 'Person';
    var $useTable = 'people';

    var $hasMany = array(
        'EducationExperience' => array(
            'className' => 'EducationExperience'
        ),
        'WorkExperience' => array(
            'className' => 'WorkExperience'
        ),
        'LanguageExperience' => array(
            'className' => 'LanguageExperience'
        )
    );
    
    var $belongsTo = array(
        'Town',
        'User'
    );

    var $validate = array(

        'name' => array(
            'rule' => 'notEmpty',
            'message' => 'Questo campo e\' obbligatorio'
        ),
        'surname' => array(
            'rule' => 'notEmpty',
            'message' => 'Questo campo e\' obbligatorio'
        ),
        'email' => array(
            'rule' => 'notEmpty',
            'message' => 'Questo campo e\' obbligatorio'
        ),
        'gender' => array(
            'rule' => 'notEmpty',
            'message' => 'Questo campo e\' obbligatorio'
        ),
        'address' => array(
            'rule' => 'notEmpty',
            'message' => 'Questo campo e\' obbligatorio'
        ),
        'birthdate' => array(
            'rule' => 'notEmpty',
            'message' => 'Questo campo e\' obbligatorio'
        ),
        'town_id' => array(
            'rule' => 'notEmpty',
            'message' => 'Questo campo e\' obbligatorio'
        ),
        'district_id' => array(
            'rule' => 'notEmpty',
            'message' => 'Questo campo e\' obbligatorio'
        ),
        'region_id' => array(
            'rule' => 'notEmpty',
            'message' => 'Questo campo e\' obbligatorio'
        )
        /*,
        'city' => array(
            'rule' => 'notEmpty',
            'message' => 'Questo campo e\' obbligatorio'
        )*/
    );

    
}

?>
